import {req_get_auth, req_post_auth, req_get} from "./axiosFun.js";
import {HOST} from '@/api/hosts'

export const getAllRatings = (params) => {
    const url = `${HOST}/rating/page`;
    return req_get_auth("get", url, params);
};

export const addRating = (data) => {
    const url = `${HOST}/rating`;
    return req_post_auth("post", url, data);
};

export const deleteRating = (id) => {
    const url = `${HOST}/rating/${id}`;
    return req_post_auth("delete", url);
};

export const updateRating = (data) => {
    const url = `${HOST}/rating`;
    return req_post_auth("put", url, data);
};
